<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>cudasynth</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="ExperimentalTop.html" title="Experimental Orchestra Opcodes and GEN Routines" />
    <link rel="prev" href="cudanal.html" title="cudanal" />
    <link rel="next" href="cudasliding.html" title="cudasliding" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">cudasynth</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="cudanal.html">Prev</a> </td>
          <th width="60%" align="center">Experimental Orchestra Opcodes and GEN Routines</th>
          <td width="20%" align="right"> <a accesskey="n" href="cudasliding.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="cudasynth"></a>
      <div class="titlepage"></div>
      <a id="IndexCudasynth" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">cudasynth</span>
        </h2>
        <p>cudasynth — 
      Synthesis by additive synthesis and inverse FFT.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp218965280"></a>
        <h2>Description</h2>
        <p>
      Synthesis by additive synthesis and inverse FFT.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp218966512"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">asig <span class="command"><strong>cudasynth</strong></span> kamp, kfreq, itab, iftab, iatab[, inum]</pre>
        <pre class="synopsis">asig <span class="command"><strong>cudasynth</strong></span> fsig, kamp, kfreq[, inum]</pre>
        <pre class="synopsis">asig <span class="command"><strong>cudasynth</strong></span> fsig</pre>
      </div>
      <div class="refsect1">
        <a id="idp218971584"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>itab</em></span> -- 
    </p>
        <p>
      <span class="emphasis"><em>iftab</em></span> -- 
    </p>
        <p>
      <span class="emphasis"><em>iatab</em></span> -- 
    </p>
        <p>
      <span class="emphasis"><em>inum</em></span> -- (optional)
    </p>
      </div>
      <div class="refsect1">
        <a id="idp218975712"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>kamp</em></span> -- 
    </p>
        <p>
      <span class="emphasis"><em>kfreq</em></span> -- 
    </p>
        <p>
      <span class="emphasis"><em>fsig</em></span> -- 
    </p>
      </div>
      <div class="refsect1">
        <a id="idp218979008"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the cudasynth opcode. It uses the file <a class="ulink" href="examples/cudasynth.csd" target="_top"><em class="citetitle">cudasynth.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp218980864"></a>
          <p class="title">
            <strong>Example 1135. Example of the cudasynth opcode.</strong>
          </p>
          <div class="example-contents">
            <p>See the sections <a class="link" href="UsingRealTime.html" title="Real-Time Audio"><em class="citetitle">Real-time Audio</em></a> and <a class="link" href="CommandFlags.html" title="Csound command line"><em class="citetitle">Command Line Flags</em></a> for more information on using command line flags.</p>
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
<span class="comment">; Select audio/midi flags here according to platform</span>
-odac      <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; -o cudsyth.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="ohdr">sr</span> <span class="op">=</span> 44100
<span class="ohdr">ksmps</span> <span class="op">=</span> 64
<span class="ohdr">nchnls</span> <span class="op">=</span> 1
<span class="ohdr">0dbfs</span> <span class="op">=</span> 1

i1 <span class="ohdr">ftgen</span> 1,0,512,7,1,512,0.001
i2 <span class="ohdr">ftgen</span> 2,0,512,<span class="op">-</span>7,1,512,512
i3 <span class="ohdr">ftgen</span> 3,0,16384,10,1
<span class="opc">schedule</span> 1,0,10

<span class="oblock">instr</span> 1
a1 cudasynth 0.001, 100,0, 2, 1,128
    <span class="opc">out</span> a1

<span class="oblock">endin</span>
<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
<span class="stamnt">e</span> 10
<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1">
        <a id="idp218985152"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: Victor Lazzarini</td>
          </tr>
          <tr>
            <td>2013</td>
          </tr>
        </table>
        <p>
    </p>
        <p>New in version 6.02</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="cudanal.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="ExperimentalTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="cudasliding.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">cudanal </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> cudasliding</td>
        </tr>
      </table>
    </div>
  </body>
</html>
